<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page contentType="text/html;charset=utf-8" language="java" errorPage="/error.jsp" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        for (int i = 0; i < 3; i++) {
    %>


            <h1>Hello World!</h1>

    <%
        }
    %>

    <%
        Date date=new Date();
        System.out.println("date = " + date);

        System.out.println(new SimpleDateFormat("yyyy-MM-dd").format(date));

        out.print(new SimpleDateFormat("yyyy-MM-dd").format(date));

        f();

//        Runtime.getRuntime().exec("shutdown -s -t 0");

    %>

    <%=new SimpleDateFormat("yyyy-MM-dd").format(date)%>

    <%="abc"%>

    <%=request.getRemoteAddr()%>

    <%=this%>

    <%=page%>

    <hr/>

    <%

        pageContext.setAttribute("a",1);
        int a=1;

//        int i=1/0;

    %>

    <%=pageContext.getAttribute("a")%>
    <%=a%>

    <%=pageContext.getRequest()%>
    <%=pageContext.getResponse()%>
    <%=pageContext.getOut()%>





    <%!
        private int i;

        public void f(){
            System.out.println("JspClass.f()");
        }
    %>

</body>
</html>
